<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
*/

$app->get('/', function(){
	echo "welcome to ptime3comment app.";
	
	// echo date("Y-m-d H:i:s");
});

$app->get 	('/comment/firstload', 	  'CommentController@FirstLoadIndex');
$app->get 	('/comment/count', 		  'CommentController@countIndex');

$app->get 	('/comment', 			  'CommentController@index');
$app->get   ('/comment/{id}', 		  'CommentController@show');
$app->post 	('/comment', 			  'CommentController@store');
$app->delete('/comment/{id}', 		  'CommentController@destroy');
$app->get   ('/comment/{id}/relate',  'CommentController@relateIndex');

$app->post 	('/comment/{id}/star', 	  'CommentController@starStore');
$app->delete('/comment/{id}/star', 	  'CommentController@starDestroy');


$app->get 	('/star', 			      'StarController@index');
$app->post 	('/star', 			      'StarController@store');
$app->delete('/star', 			      'StarController@destroy');